<?php

class Core_Form_User_UploadDiploma extends RedCross_Form {
    public function __construct($options = null) {
        parent::__construct($options);
        $this->setName('upload_diploma');
        $this->setAttrib('enctype', 'multipart/form-data');
    }
    
    public function init() {
        $description = new Zend_Form_Element_Text('description');
        $description->setLabel('Beskrivelse')
                    ->setRequired(true)
                    ->addValidator('NotEmpty');

        $file = new Zend_Form_Element_File('file');
        $file->setLabel('File')
             ->setRequired(true)
             ->setDestination(Zend_Registry::get('upload_temp_path'));
             //->addValidator('NotEmpty');

        $hidden = new Zend_Form_Element_Hidden('submit_diploma');

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Last opp sertifikat');
        
        $this->addElements(array($description, $file, $hidden, $submit));
    }
}

?>
